package com.hairline.mapper;

import com.hairline.bean.Goods;
import com.hairline.bean.GoodsExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface GoodsMapper {
    long countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Goods record);

    int insertSelective(Goods record);

    List<Goods> selectByExampleWithBLOBs(GoodsExample example);

    List<Goods> selectByExample(GoodsExample example);

    Goods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKeyWithBLOBs(Goods record);

    int updateByPrimaryKey(Goods record);

    int selectLastId();

    int count();

    @Select("select pic_url from cskaoyanmall_goods where id = #{id}")
    String selectPicUrlById(Integer id);

    @Select("select brand_id from cskaoyanmall_goods where id = #{id}")
    Integer selectBrandIdById(Integer id);

    @Select("select category_id from cskaoyanmall_goods where id = #{id}")
    Integer selectCategoryIdById(Integer id);

    List<Goods> selectGoods(Integer id1);
}
